From: Debian Med Packaging Team Date: Wed, 1 Oct 2025 18:43:25 +0000 (-0400) Subject: zcf-simde-crc32c X-Git-Tag: archive/raspbian/2.17.0+ds-6+rpi1^2^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b6cb04fea016aceb1feae53d232b620d64d8f49a;p=ncbi-blast%2B.git zcf-simde-crc32c Gbp-Pq: Name zcf-simde-crc32c --- diff --git a/c++/src/util/compress/zlib_cloudflare/deflate.c b/c++/src/util/compress/zlib_cloudflare/deflate.c index cb495d3b..9b6fa1d9 100644 --- a/c++/src/util/compress/zlib_cloudflare/deflate.c +++ b/c++/src/util/compress/zlib_cloudflare/deflate.c @@ -129,27 +129,11 @@ static const config configuration_table[10] = { /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ #define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) -#ifdef __aarch64__ - -#include -#include -static uint32_t hash_func(deflate_state *s, void* str) { - return __crc32cw(0, *(uint32_t*)str) & s->hash_mask; -} - -#elif defined __x86_64__ || defined _M_AMD64 - -#include +#include static uint32_t hash_func(deflate_state *s, void* str) { - return _mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask; + return simde_mm_crc32_u32(0, *(uint32_t*)str) & s->hash_mask; } -#else - -#error "Only 64-bit Intel and ARM architectures are supported" - -#endif - /* =========================================================================== * Insert string str in the dictionary and return the previous head * of the hash chain (the most recent string with same hash key).